/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vamprest;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author sav
 */
@Entity
@Table(name = "poinotation")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Poinotation.findAll", query = "SELECT p FROM Poinotation p"),
    @NamedQuery(name = "Poinotation.findByIdpoinotation", query = "SELECT p FROM Poinotation p WHERE p.idpoinotation = :idpoinotation"),
    @NamedQuery(name = "Poinotation.findByIdmember", query = "SELECT p FROM Poinotation p WHERE p.idmember = :idmember"),
    @NamedQuery(name = "Poinotation.findByIdpoi", query = "SELECT p FROM Poinotation p WHERE p.idpoi = :idpoi")})
public class Poinotation implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "idpoinotation")
    private Integer idpoinotation;
    @Basic(optional = false)
    @NotNull
    @Column(name = "favorite")
    private int favorite;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ilike")
    private int ilike;
    @Basic(optional = false)
    @NotNull
    @Column(name = "iunlike")
    private int iunlike;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idmember")
    private int idmember;
    @Basic(optional = false)
    @NotNull
    @Column(name = "idpoi")
    private int idpoi;

    public Poinotation() {
    }

    public Poinotation(Integer idpoinotation) {
        this.idpoinotation = idpoinotation;
    }

    public Poinotation(Integer idpoinotation, int favorite, int like, int unlike, int idmember, int idpoi) {
        this.idpoinotation = idpoinotation;
        this.favorite = favorite;
        this.ilike = like;
        this.iunlike = unlike;
        this.idmember = idmember;
        this.idpoi = idpoi;
    }

    public Integer getIdpoinotation() {
        return idpoinotation;
    }

    public void setIdpoinotation(Integer idpoinotation) {
        this.idpoinotation = idpoinotation;
    }

    public int getFavorite() {
        return favorite;
    }

    public void setFavorite(int favorite) {
        this.favorite = favorite;
    }

    public int getIlike() {
        return ilike;
    }

    public void setIlike(int islike) {
        this.ilike = islike;
    }

    public int getIunlike() {
        return iunlike;
    }

    public void setIunlike(int unlike) {
        this.iunlike = unlike;
    }

    public int getIdmember() {
        return idmember;
    }

    public void setIdmember(int idmember) {
        this.idmember = idmember;
    }

    public int getIdpoi() {
        return idpoi;
    }

    public void setIdpoi(int idpoi) {
        this.idpoi = idpoi;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpoinotation != null ? idpoinotation.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Poinotation)) {
            return false;
        }
        Poinotation other = (Poinotation) object;
        if ((this.idpoinotation == null && other.idpoinotation != null) || (this.idpoinotation != null && !this.idpoinotation.equals(other.idpoinotation))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "vamprest.Poinotation[ idpoinotation=" + idpoinotation + " ]";
    }

}
